package com.nation.domain;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;

/**
 * Created by dqd on 2017/11/3.
 */
@Entity
@Table(name = "V_social_and_condition", schema = "show_nation", catalog = "")
public class VSocialAndCondition implements Serializable {
    private int id;
    private String country_code;
    private Long population;
    private Integer census_time;
    private String nation;
    private String marriage_system;
    private String religion;
    private String festival;
    private String people_livelihood;
    private String news_publish;
    private String reference;
    private String statistics;
    private String conferences;
    private String picture;
    private String recoder_id;
    private String recoder_time;
    private String nation_z;

    public VSocialAndCondition(){}
    public VSocialAndCondition(String statistics, String conferences, Long population, int census_time, String nation, String marriage_system,
                               String religion, String festival, String country_code, String people_livelihood ,
                               String reference , String news_publish){
        this.statistics =statistics ;
        this.conferences =conferences ;
        this. population=population ;
        this.census_time = census_time;
        this.nation =nation ;

        this.marriage_system =marriage_system ;
        this.religion =religion ;
        this. festival= festival;
        this. country_code= country_code;
        this. people_livelihood= people_livelihood;

        this.reference =reference ;
        this.news_publish = news_publish;

    }
    private String continent;

    public String getContinent() {
        return continent;
    }

    public void setContinent(String continent) {
        this.continent = continent;
    }
    @Basic
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "country_code", nullable = false, length = 4)
    public String getCountry_code() {
        return country_code;
    }

    public void setCountry_code(String country_code) {
        this.country_code = country_code;
    }

    @Basic
    @Column(name = "population", nullable = true)
    public Long getPopulation() {
        return population;
    }

    public void setPopulation(Long population) {
        this.population = population;
    }

    @Basic
    @Column(name = "census_time", nullable = true)
    public Integer getCensus_time() {
        return census_time;
    }

    public void setCensus_time(Integer census_time) {
        this.census_time = census_time;
    }

    @Basic
    @Column(name = "nation", nullable = true, length = 50)
    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    @Basic
    @Column(name = "marriage_system", nullable = true, length = 50)
    public String getMarriage_system() {
        return marriage_system;
    }

    public void setMarriage_system(String marriage_system) {
        this.marriage_system = marriage_system;
    }

    @Basic
    @Column(name = "religion", nullable = true, length = 50)
    public String getReligion() {
        return religion;
    }

    public void setReligion(String religion) {
        this.religion = religion;
    }

    @Basic
    @Column(name = "festival", nullable = true, length = 50)
    public String getFestival() {
        return festival;
    }

    public void setFestival(String festival) {
        this.festival = festival;
    }

    @Basic
    @Column(name = "people_livelihood", nullable = true, length = 255)
    public String getPeople_livelihood() {
        return people_livelihood;
    }

    public void setPeople_livelihood(String people_livelihood) {
        this.people_livelihood = people_livelihood;
    }

    @Basic
    @Column(name = "news_publish", nullable = true, length = 255)
    public String getNews_publish() {
        return news_publish;
    }

    public void setNews_publish(String news_publish) {
        this.news_publish = news_publish;
    }

    @Basic
    @Column(name = "reference", nullable = false, length = 255)
    public String getReference() {
        return reference;
    }

    public void setReference(String reference) {
        this.reference = reference;
    }

    @Basic
    @Column(name = "statistics", nullable = false, length = 255)
    public String getStatistics() {
        return statistics;
    }

    public void setStatistics(String statistics) {
        this.statistics = statistics;
    }

    @Basic
    @Column(name = "conferences", nullable = false, length = 255)
    public String getConferences() {
        return conferences;
    }

    public void setConferences(String conferences) {
        this.conferences = conferences;
    }

    @Basic
    @Column(name = "picture", nullable = true, length = 255)
    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Basic
    @Column(name = "recoder_id", nullable = false, length = 3)
    public String getRecoder_id() {
        return recoder_id;
    }

    public void setRecoder_id(String recoder_id) {
        this.recoder_id = recoder_id;
    }

    @Basic
    @Column(name = "recoder_time", nullable = false)
    public String getRecoder_time() {
        return recoder_time;
    }

    public void setRecoder_time(String recoder_time) {
        this.recoder_time = recoder_time;
    }

    @Basic
    @Column(name = "nation_z", nullable = false, length = 255)
    public String getNation_z() {
        return nation_z;
    }

    public void setNation_z(String nation_z) {
        this.nation_z = nation_z;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VSocialAndCondition that = (VSocialAndCondition) o;

        if (id != that.id) return false;
        if (country_code != null ? !country_code.equals(that.country_code) : that.country_code != null) return false;
        if (population != null ? !population.equals(that.population) : that.population != null) return false;
        if (census_time != null ? !census_time.equals(that.census_time) : that.census_time != null) return false;
        if (nation != null ? !nation.equals(that.nation) : that.nation != null) return false;
        if (marriage_system != null ? !marriage_system.equals(that.marriage_system) : that.marriage_system != null)
            return false;
        if (religion != null ? !religion.equals(that.religion) : that.religion != null) return false;
        if (festival != null ? !festival.equals(that.festival) : that.festival != null) return false;
        if (people_livelihood != null ? !people_livelihood.equals(that.people_livelihood) : that.people_livelihood != null)
            return false;
        if (news_publish != null ? !news_publish.equals(that.news_publish) : that.news_publish != null) return false;
        if (reference != null ? !reference.equals(that.reference) : that.reference != null) return false;
        if (statistics != null ? !statistics.equals(that.statistics) : that.statistics != null) return false;
        if (conferences != null ? !conferences.equals(that.conferences) : that.conferences != null) return false;
        if (picture != null ? !picture.equals(that.picture) : that.picture != null) return false;
        if (recoder_id != null ? !recoder_id.equals(that.recoder_id) : that.recoder_id != null) return false;
        if (recoder_time != null ? !recoder_time.equals(that.recoder_time) : that.recoder_time != null) return false;
        if (nation_z != null ? !nation_z.equals(that.nation_z) : that.nation_z != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (country_code != null ? country_code.hashCode() : 0);
        result = 31 * result + (population != null ? population.hashCode() : 0);
        result = 31 * result + (census_time != null ? census_time.hashCode() : 0);
        result = 31 * result + (nation != null ? nation.hashCode() : 0);
        result = 31 * result + (marriage_system != null ? marriage_system.hashCode() : 0);
        result = 31 * result + (religion != null ? religion.hashCode() : 0);
        result = 31 * result + (festival != null ? festival.hashCode() : 0);
        result = 31 * result + (people_livelihood != null ? people_livelihood.hashCode() : 0);
        result = 31 * result + (news_publish != null ? news_publish.hashCode() : 0);
        result = 31 * result + (reference != null ? reference.hashCode() : 0);
        result = 31 * result + (statistics != null ? statistics.hashCode() : 0);
        result = 31 * result + (conferences != null ? conferences.hashCode() : 0);
        result = 31 * result + (picture != null ? picture.hashCode() : 0);
        result = 31 * result + (recoder_id != null ? recoder_id.hashCode() : 0);
        result = 31 * result + (recoder_time != null ? recoder_time.hashCode() : 0);
        result = 31 * result + (nation_z != null ? nation_z.hashCode() : 0);
        return result;
    }
}
